FROM harbor.devops.win/winhong/ansible:v1.6
#FROM bitnami/minideb-extras-base:buster
#FROM harbor.devops.win/library/alpine:3.18
LABEL maintainer "zhaorf <zhaorf@winhong.com>"

COPY config/ /check/config/
COPY inventory/ /check/inventory/
COPY script/ /check/script/
COPY check.sh /check
COPY checkpods.tpl /check
COPY check.yml /check
COPY bin/column-amd64 /usr/local/bin/column

RUN curl http://192.168.100.10:31444/kubernetes/kubectl-v1.23.6-amd64 -o /usr/local/bin/kubectl
RUN curl http://192.168.100.10:31444/minio/linux-amd64/mc -o /usr/local/bin/mc
RUN curl http://192.168.100.10:31444/jq/1.7.1/jq-linux-amd64 -o /usr/local/bin/jq


RUN chmod +x /check/check.sh && chmod +x /check/script/* && chmod +x /usr/local/bin/kubectl && chmod +x /usr/local/bin/mc  && chmod +x /usr/local/bin/jq && chmod +x /usr/local/bin/column &&\
     ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

WORKDIR /check

ENTRYPOINT ["/bin/bash"]
